<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="fragments/head :: head(~{:: title})">
    <title>初始化</title>
    <link rel="stylesheet" href="../../static/css/bootstrap.min.css"/>
</head>
<body>
<nav th:replace="fragments/navbar :: navbar">导航栏</nav>
<div class="container">
    <div th:insert="fragments/alert :: alert">alert</div>
    <h3 class="text-center">工程初始化管理</h3>
    <br/>
    <div class="row">
        <div class="text-center col-sm-6">
            <button class="form-control"><a th:href="@{/web/conf/db/list}">加载最新物理表</a></button>
        </div>
        <div class="text-center col-sm-6">
            <button class="form-control"><a th:href="@{/web/cg/init/all}">全部初始化</a></button>
        </div>
    </div>
    <br/>
    <br />
    <div class="row" th:each="initFileType,typeStat: ${list}">
        <h4 th:text="${typeStat.count + '. ' + initFileType.typeName}"></h4>
        <table class="table table-bordered">
            <thead class="text-center">
            <tr>
                <td width="5%">序号</td>
                <td width="15%">文件</td>
                <td width="50%">文件位置</td>
                <td width="20%">说明</td>
                <td width="10%">操作</td>
            </tr>
            </thead>
            <tbody class="text-center">
            <tr th:each="initFileInfo,fileStat: ${initFileType.fileInfoList}">
                <td class="text-center" th:text="${typeStat.count + '.' + fileStat.count}">${typeStat}.${fileStat}
                </td>
                <td class="text-left" th:text="${initFileType.typeName + ':' + initFileInfo.fileName}">
                    基础配置：pom.xml
                </td>
                <td class="text-left" th:text="${initFileInfo.filePath}"></td>
                <td class="text-left" th:text="${initFileInfo.fileInfo}"></td>
                <td class="text-center">
                    <a th:href="@{'/web/conf/init/preview/' + ${initFileInfo.fileName}}">预览</a>
                    <a th:href="@{'/web/cg/init/file/' + ${initFileInfo.fileName}}">创建</a>
                </td>
            </tr>
            <tr>
                <td colspan="5">
                    <button class="form-control">
                        <a th:href="@{'/web/cg/init/type/' + ${initFileType.typeId}}"
                           th:text="${'创建所有' + initFileType.typeName}">初始化基础配置</a>
                    </button>
                </td>
            </tr>
            </tbody>
        </table>
        <br />
    </div>

    <div th:replace="fragments/footer :: copy">版权信息</div>
</div>

</body>
</html>